
<#macro digui_tpltree1 tpltree1Nodes  flag >
	<#list tpltree1Nodes as tpltree1>
		<tr>
	    	<td width=700px height=30px >
				${flag} 
	    		<span>名称: </span><input value="${tpltree1.name?if_exists}" style="width: 120px; " onchange="javascript:action_tpltree1('update.do','column=name&id=${tpltree1.id?if_exists}&columnValue='+this.value)" /> 
			    <span>别名:</span><input value="${tpltree1.alias?if_exists}" style="width: 120px; "  onchange="javascript:action_tpltree1('update.do','column=alias&id=${tpltree1.id?if_exists}&columnValue='+this.value)" /> 
			</td>
			
		 	     
 			<td width=250px>		 	  
			    <div class="btn-group btn-group-xs">
			   
				<a  class="btn btn-xs btn-default" onclick="javascript:action_tpltree1('create.do','id=${tpltree1.id}');"  ><span class="fa fa-plus-circle"></span></a>
 		  
				



  		  		
 			<#if (tpltree1.getChildTpltree1s()?size<1)> 
				<a  class="btn btn-xs btn-default" title="Delete" onclick="javascript:action_tpltree1('delete.do','id=${tpltree1.id}');" title=Delete ><span class="fa fa-trash-o"></span></a>
		  	</#if> 				
			<#if tpltree1Nodes?size?string=="1" > 
				<a  class="btn btn-xs btn-default" onclick="javascript:action_tpltree1('change_level.do','id=${tpltree1.id?if_exists}');"  title=MoveLeft ><span class="fa fa-angle-left"> </span></a>     
			<#else>
				<#assign index =tpltree1_index>                                                
			 	<#if index?string=="0">
			 	    <a class="btn btn-xs btn-default" onclick="javascript:action_tpltree1('change_rank.do','id_from=${tpltree1.id?if_exists}&id_to=${tpltree1Nodes[tpltree1_index+1].id}')"   title=MoveDown><span class="fa fa-angle-down"> </span></a>
			  	    <a class="btn btn-xs btn-default"  onclick="javascript:action_tpltree1('change_level.do','id=${tpltree1.id?if_exists}')"   title=MoveLeft><span class="fa fa-angle-left"> </span></a>   
			 	<#else>
			 	    <#if tpltree1_has_next>
				 	    <a class="btn btn-xs btn-default" onclick="javascript:action_tpltree1('change_rank.do','id_from=${tpltree1.id?if_exists}&id_to=${tpltree1Nodes[tpltree1_index-1].id}')"  title=MoveUp><span class="fa fa-angle-up"> </span></a>
						<a  class="btn btn-xs btn-default" onclick="javascript:action_tpltree1('change_rank.do','id_from=${tpltree1.id?if_exists}&id_to=${tpltree1Nodes[tpltree1_index+1].id}')"  title=MoveDown><span class="fa fa-angle-down"> </span></a>
					<#else>
					    <a class="btn btn-xs btn-default" onclick="javascript:action_tpltree1('change_rank.do','id_from=${tpltree1.id?if_exists}&id_to=${tpltree1Nodes[tpltree1_index-1].id}')"   title=MoveUp><span class="fa fa-angle-up"> </span></a>
					</#if>
					<a class="btn btn-xs btn-default" onclick="javascript:action_tpltree1('change_level.do','id=${tpltree1.id?if_exists}')"  title=MoveLeft><span class="fa fa-angle-left"> </span></a>      
	 				<a class="btn btn-xs btn-default" onclick="javascript:action_tpltree1('change_level.do','id=${tpltree1.id?if_exists}&parentId=${tpltree1Nodes[tpltree1_index-1].id}')"  title=MoveRight><span class="fa fa-angle-right"> </span></a>	
			 	</#if>
			</#if>
	
			  
			  </div>
			</td>
			
		</tr>
		  
		<#if !(tpltree1.getChildTpltree1s()?size<1)> 
			<@digui_tpltree1 tpltree1.getChildTpltree1s()?sort_by('sortNob'),flag+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" />	
		</#if>
	</#list> 
</#macro>
 
<table class="table  table-condensed" style="width:1000px">
	<thead>
		<tr>
			<th>树型内容</th><th>操作</th>
		</tr>
	</thead>   
    <@digui_tpltree1 rhs["tpltree1RootList"]?sort_by('sortNob'),""/>
</table>

<span id="div_action_result" style="display:none">
	${rhs["info"]?if_exists}
</span>
